#!/usr/bin/env python3
# -*- coding: utf-8 -*-

from dragon.selector import Selector
from dragon.page import DraPage

class StrategyBarSe:
    # 策略栏
    strategyCountBubble=Selector('div.badge','策略数气泡')
    strategy=Selector('div.factors-item','策略')
    selectedStrategy=Selector('div.factors-item.change-item','选中的策略')
    rightScrollButton=Selector('div.right-scroll-icon','右滚按钮')
    leftScrollButton=Selector('div.left-scroll-icon','左滚按钮')
    baseStrategy=Selector('text=基本因子','基本因子')
    strongStrategy=Selector('text=强势调整选股','强势调整选股')
    hzw1Strategy=Selector('text=和众w1','和众w1')
    searchButton=Selector('div.factors-right>i.el-icon','搜索按钮')
    reloadButton=Selector('div.right-refresh.refresh','刷新按钮')

class StrategyBar:
    def __init__(self, draPage: DraPage):
        self.strategyCountBubble = draPage.locator(StrategyBarSe.strategyCountBubble)
        self.strategy = draPage.locator(StrategyBarSe.strategy)
        self.selectedStrategy = draPage.locator(StrategyBarSe.selectedStrategy)
        self.rightScrollButton = draPage.locator(StrategyBarSe.rightScrollButton)
        self.leftScrollButton = draPage.locator(StrategyBarSe.leftScrollButton)
        self.baseStrategy = draPage.locator(StrategyBarSe.baseStrategy)
        self.strongStrategy = draPage.locator(StrategyBarSe.strongStrategy)
        self.hzw1Strategy = draPage.locator(StrategyBarSe.hzw1Strategy)
        self.searchButton = draPage.locator(StrategyBarSe.searchButton)
        self.reloadButton = draPage.locator(StrategyBarSe.reloadButton)













